﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using DAL;

namespace BLL
{
    public class BatteryCenter : BatteryStation
    {
        public bool Mark { get; set; }
        public IList<Edge> Edgelist;

        public BatteryCenter()
        {
            Edgelist = new List<Edge>();
        }

        public void AddEdge(BatteryCenter station, double distance, bool twoWay)
        {
            Edge newEdge = new Edge() { BatteryStation1 = station, distance = distance };

            Edgelist.Add(newEdge);

            if (twoWay)
                station.AddEdge(this, distance, false);
        }

        public int OutDegree()
        {
            return Edgelist.Count;
        }

        public void RemoveEdge(Edge edge)
        {
            Edgelist.Remove(edge);
        }
    }
}